#include <iostream>
using namespace std;

bool val(double x) {
    if ((int)x >= 0 && (int)x <= 59)
        return true;
    else
        return false;
}

int main() {
    double a = 0, b = 0, c = 0;
    cin >> a;
    cin >> b;
    cin >> c;
    if (a >= 0 && val(b) && val(c)) {
        b = b / 60;
        c = c / 3600;
        cout << a + b + c << endl;
    } else {
        cout << "invalid input" << endl;
    }
    system("pause");
    return 0;
}